﻿using System;

namespace Microsoft.Xna.Framework.Input
{
    /// <summary>
    /// Enumerates input device buttons.
    /// </summary>
    [Flags]
    public enum Buttons
    {
		/// <summary>
		/// A button
		/// </summary>
        A = 4096,
		/// <summary>
		/// B button
		/// </summary>
        B = 8192,
		/// <summary>
		/// X button
		/// </summary>
        X = 16384,
		/// <summary>
		/// Y button
		/// </summary>
        Y = 32768,
		/// <summary>
		/// BACK button
		/// </summary>
        Back = 32,
		/// <summary>
		/// Big button
		/// </summary>
        BigButton = 2048,
		/// <summary>
		/// START button
		/// </summary>
        Start = 16,
		/// <summary>
		/// Directional pad up
		/// </summary>
        DPadUp = 1,
		/// <summary>
		/// Directional pad down
		/// </summary>
        DPadDown = 2,
		/// <summary>
		/// Directional pad left
		/// </summary>
        DPadLeft = 4,
		/// <summary>
		/// Directional pad right
		/// </summary>
        DPadRight = 8,
		/// <summary>
		/// Left bumper (shoulder) button
		/// </summary>
        LeftShoulder = 256,
		/// <summary>
		/// Right bumper (shoulder) button
		/// </summary>
        RightShoulder = 512,
		/// <summary>
		/// Left stick button (pressing the left stick)
		/// </summary>
        LeftStick = 64,
		/// <summary>
		/// Right stick button (pressing the right stick)
		/// </summary>
        RightStick = 128,
		/// <summary>
		/// Left stick is toward the left
		/// </summary>
        LeftThumbstickLeft = 2097152,
		/// <summary>
		/// Left stick is toward the right
		/// </summary>
        LeftThumbstickRight = 1073741824,
		/// <summary>
		/// Left stick is toward down
		/// </summary>
        LeftThumbstickDown = 536870912,
		/// <summary>
		/// Left stick is toward up
		/// </summary>
        LeftThumbstickUp = 268435456,
		/// <summary>
		/// Right stick is toward the left
		/// </summary>
        RightThumbstickLeft = 134217728,
		/// <summary>
		/// Right stick is toward the right
		/// </summary>
        RightThumbstickRight = 67108864,
		/// <summary>
		/// Right stick is toward down
		/// </summary>
        RightThumbstickDown = 33554432,
		/// <summary>
		/// Right stick is toward up
		/// </summary>
        RightThumbstickUp = 16777216,
		/// <summary>
		/// Left trigger
		/// </summary>
        LeftTrigger = 8388608,
		/// <summary>
		/// Right trigger
		/// </summary>
        RightTrigger = 4194304
    }

    /// <summary>
    /// Identifies the state of a controller button.
    /// </summary>
    public enum ButtonState
    {
		/// <summary>
		/// The button is pressed.
		/// </summary>
        Pressed = 1,
		/// <summary>
		/// The button is released.
		/// </summary>
        Released = 0
    }

    /// <summary>
    /// Specifies a type of dead zone processing to apply to Xbox 360 controller analog sticks when calling GetState.
    /// </summary>
    public enum GamePadDeadZone
    {
		/// <summary>
		/// The combined X and Y position of each stick is compared to the dead zone. This provides better control than IndependentAxes when the stick is used as a two-dimensional control surface, such as when controlling a character's view in a first-person game.
		/// </summary>
        Circular = 2,
		/// <summary>
		/// The X and Y positions of each stick are compared against the dead zone independently. This setting is the default when calling GetState.
		/// </summary>
        IndependentAxes = 1,
		/// <summary>
		/// The values of each stick are not processed and are returned by GetState as "raw" values. This is best if you intend to implement your own dead zone processing.
		/// </summary>
        None = 0
    }

    /// <summary>
    /// Describes the type of a specified Xbox 360 controller.
    /// </summary>
    public enum GamePadType
    {
		/// <summary>
		/// Controller is an alternate guitar
		/// </summary>
        AlternateGuitar = 7,
		/// <summary>
		/// Controller is an Arcade stick
		/// </summary>
        ArcadeStick = 3,
		/// <summary>
		/// Controller is a big button pad
		/// </summary>
        BigButtonPad = 0x300,
		/// <summary>
		/// Controller is a dance pad
		/// </summary>
        DancePad = 5,
		/// <summary>
		/// Controller is a flight stick
		/// </summary>
        FlightStick = 4,
		/// <summary>
		/// Controller is the Xbox 360 Controller
		/// </summary>
        GamePad = 1,
		/// <summary>
		/// Controller is an unknown type
		/// </summary>
        Unknown = 0,
		/// <summary>
		/// Controller is a wheel
		/// </summary>
        Wheel = 2,
		/// <summary>
		/// Controller is a guitar
		/// </summary>
        Guitar = 6,
		/// <summary>
		/// Controller is a drum kit
		/// </summary>
        DrumKit = 8
    }

    /// <summary>
    /// Identifies a particular key on a keyboard.
    /// </summary>
    public enum Keys
    {
        None = 0,
        Back = 8,
        Tab = 9,
        Enter = 13,
        CapsLock = 20,
        Escape = 27,
        Space = 32,
        PageUp = 33,
        PageDown = 34,
        End = 35,
        Home = 36,
        Left = 37,
        Up = 38,
        Right = 39,
        Down = 40,
        Select = 41,
        Print = 42,
        Execute = 43,
        PrintScreen = 44,
        Insert = 45,
        Delete = 46,
        Help = 47,
        D0 = 48,
        D1 = 49,
        D2 = 50,
        D3 = 51,
        D4 = 52,
        D5 = 53,
        D6 = 54,
        D7 = 55,
        D8 = 56,
        D9 = 57,
        A = 65,
        B = 66,
        C = 67,
        D = 68,
        E = 69,
        F = 70,
        G = 71,
        H = 72,
        I = 73,
        J = 74,
        K = 75,
        L = 76,
        M = 77,
        N = 78,
        O = 79,
        P = 80,
        Q = 81,
        R = 82,
        S = 83,
        T = 84,
        U = 85,
        V = 86,
        W = 87,
        X = 88,
        Y = 89,
        Z = 90,
        LeftWindows = 91,
        RightWindows = 92,
        Apps = 93,
        Sleep = 95,
        NumPad0 = 96,
        NumPad1 = 97,
        NumPad2 = 98,
        NumPad3 = 99,
        NumPad4 = 100,
        NumPad5 = 101,
        NumPad6 = 102,
        NumPad7 = 103,
        NumPad8 = 104,
        NumPad9 = 105,
        Multiply = 106,
        Add = 107,
        Separator = 108,
        Subtract = 109,
        Decimal = 110,
        Divide = 111,
        F1 = 112,
        F2 = 113,
        F3 = 114,
        F4 = 115,
        F5 = 116,
        F6 = 117,
        F7 = 118,
        F8 = 119,
        F9 = 120,
        F10 = 121,
        F11 = 122,
        F12 = 123,
        F13 = 124,
        F14 = 125,
        F15 = 126,
        F16 = 127,
        F17 = 128,
        F18 = 129,
        F19 = 130,
        F20 = 131,
        F21 = 132,
        F22 = 133,
        F23 = 134,
        F24 = 135,
        NumLock = 144,
        Scroll = 145,
        LeftShift = 160,
        RightShift = 161,
        LeftControl = 162,
        RightControl = 163,
        LeftAlt = 164,
        RightAlt = 165,
        BrowserBack = 166,
        BrowserForward = 167,
        BrowserRefresh = 168,
        BrowserStop = 169,
        BrowserSearch = 170,
        BrowserFavorites = 171,
        BrowserHome = 172,
        VolumeMute = 173,
        VolumeDown = 174,
        VolumeUp = 175,
        MediaNextTrack = 176,
        MediaPreviousTrack = 177,
        MediaStop = 178,
        MediaPlayPause = 179,
        LaunchMail = 180,
        SelectMedia = 181,
        LaunchApplication1 = 182,
        LaunchApplication2 = 183,
        OemSemicolon = 186,
        OemPlus = 187,
        OemComma = 188,
        OemMinus = 189,
        OemPeriod = 190,
        OemQuestion = 191,
        OemTilde = 192,
        OemOpenBrackets = 219,
        OemPipe = 220,
        OemCloseBrackets = 221,
        OemQuotes = 222,
        Oem8 = 223,
        OemBackslash = 226,
        ProcessKey = 229,
        Attn = 246,
        Crsel = 247,
        Exsel = 248,
        EraseEof = 249,
        Play = 250,
        Zoom = 251,
        Pa1 = 253,
        OemClear = 254,
        ChatPadGreen = 0xCA,
        ChatPadOrange = 0xCB,
        Pause = 0x13,
        ImeConvert = 0x1c,
        ImeNoConvert = 0x1d,
        Kana = 0x15,
        Kanji = 0x19,
        OemAuto = 0xf3,
        OemCopy = 0xf2,
        OemEnlW = 0xf4
    }

    /// <summary>
    /// Identifies the state of a keyboard key.
    /// </summary>
    public enum KeyState
    {
		/// <summary>
		/// Key is released.
		/// </summary>
        Up,
		/// <summary>
		/// Key is pressed.
		/// </summary>
        Down
    }
}
